home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3p / barrier.z / barrier
Encoding:
Text File  |  1998-10-20  |  3.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. BBBBAAAARRRRRRRRIIIIEEEERRRR((((3333PPPP))))                                                        BBBBAAAARRRRRRRRIIIIEEEERRRR((((3333PPPP))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      barrier, new_barrier, init_barrier, free_barrier - barrier functions
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<uuuulllloooocccckkkkssss....hhhh>>>>
  13.  
  14.      bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****nnnneeeewwww____bbbbaaaarrrrrrrriiiieeeerrrr ((((uuuussssppppttttrrrr____tttt ****hhhhaaaannnnddddlllleeee))));;;;
  15.  
  16.      vvvvooooiiiidddd ffffrrrreeeeeeee____bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb))));;;;
  17.  
  18.      vvvvooooiiiidddd iiiinnnniiiitttt____bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb))));;;;
  19.  
  20.      vvvvooooiiiidddd bbbbaaaarrrrrrrriiiieeeerrrr ((((bbbbaaaarrrrrrrriiiieeeerrrr____tttt ****bbbb,,,, uuuunnnnssssiiiiggggnnnneeeedddd nnnn))));;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      These routines provide a simple rendezvous mechanism for shared address
  24.      processes.
  25.  
  26.      _n_e_w__b_a_r_r_i_e_r takes a usptr_t as an argument to indicate the shared arena
  27.      from which to allocate the barrier.  The usptr_t is a previously
  28.      allocated handle obtained through a call to _u_s_i_n_i_t(_3_P).
  29.  
  30.      The _b_a_r_r_i_e_r function takes a pointer to a previously allocated and
  31.      initialized barrier structure (as returned by _n_e_w__b_a_r_r_i_e_r) and the number
  32.      of processes/sub-tasks to wait for.  As each process enters the barrier,
  33.      it spins (busy wait) until all _n processes enter the barrier.  At that
  34.      time all are released and continue executing.
  35.  
  36.      _f_r_e_e__b_a_r_r_i_e_r releases all storage associated with _b.
  37.  
  38.      _i_n_i_t__b_a_r_r_i_e_r resets the barrier to its default state.
  39.  
  40.      _n_e_w__b_a_r_r_i_e_r will fail if one or more of the following are true:
  41.  
  42.      [ENOMEM]       There is not enough space to allocate a barrier structure.
  43.  
  44.      [ENOMEM]       It is not possible to allocate a lock.
  45.  
  46. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  47.      sproc(2), usinit(3P), ussetlock(3P), usunsetlock(3P), usnewlock(3P).
  48.  
  49. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  50.      Upon successful completion, _n_e_w__b_a_r_r_i_e_r returns a pointer to a barrier
  51.      struct.  Otherwise, a value of 0 is returned to the calling process.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.